package com.job.GaoYuXuan.Homework0711;

import java.util.Scanner;

/**
 * @author 盖
 * @version 1.0
 * @since 2022-07-11 21:14:06
 */
public class Demo3 {
    //Object类
    public static void main(String[] args) {
        Scanner a = new Scanner(System.in);
        Scanner b = new Scanner(System.in);
        System.out.println(a.getClass().getName());
        System.out.println(a.hashCode());
        System.out.println(b.hashCode());
        //toString()
        Demo1 h = Demo1.getInstance();
        Demo1 j = Demo1.getInstance();
        System.out.println(h.hashCode());
        System.out.println(j.hashCode());
        //打印一个引用类型的变量，默认会调用toString这个方法
        System.out.println(h);
        System.out.println(h.toString());
    }
}